package com.example.reader;

import com.example.entity.Person;
import org.springframework.batch.item.ItemReader;
import org.springframework.batch.item.NonTransientResourceException;
import org.springframework.batch.item.ParseException;
import org.springframework.batch.item.UnexpectedInputException;

/**
 * @description
 * @author: ruanchengzhi
 * @create: 2021-07-29 20:15
 **/
public class BatchReader implements ItemReader<Person> {
    @Override
    public Person read() throws Exception, UnexpectedInputException, ParseException, NonTransientResourceException {
        Person person = new Person();
        person.setId(1);
        person.setName("batchReader");
        return person;
    }
}
